﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PCMaintenanceList.aspx.cs" EnableEventValidation="false" Inherits="WMS6.Web.Inventory.PCMaintenanceList" meta:resourcekey="Page" %>
<%@ PreviousPageType VirtualPath="~/Inventory/PCMaintenanceQuery.aspx" %>
<%@ Register src="../UserControls/Pager.ascx" tagname="Pager" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>PCMaintenanceList</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />
    <script src="../Js/jquery.js" type="text/javascript"></script>
    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script> 
    <script src="../Js/checkbox.js" type="text/javascript"></script>
    <script src="../Js/util.js" type="text/javascript"></script>
    <script src="../Js/InitPage.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initListPage();
        }
        
        function returnSearch()
        {
            var from = document.getElementById("hdnFrom").value;
            if(from != "")
            {
                window.location.href = "PCMaintenanceQuery.aspx";
            }
            else
            {
                window.history.go(-1);
            }
        }
        function CheckTrue(chkid, obj,qty) 
        {
            if (parseInt(obj.value) >= 0 && parseInt(obj.value) != (qty)) {

                if (!document.getElementById(chkid).checked) {
                    document.getElementById(chkid).onclick();
                    document.getElementById(chkid).checked = true;
                }
            }
            else 
            {
                if (document.getElementById(chkid).checked) {
                    document.getElementById(chkid).onclick();
                    document.getElementById(chkid).checked = '';
                }
            }
        }
    </script>
</head>
<body>
    <form id="F5552" runat="server">
    <div>
            
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
        
            <div id="div_List_top">
                <table>
                    <tr>
                        <td valign="bottom"><asp:Label ID="lblReceiptInquiryList" runat="server" 
                                CssClass="label_header"  Text="物理盘点维护列表" 
                                meta:resourcekey="lblReceiptInquiryList" ></asp:Label></td>
                        <td><asp:Button ID="btnNew" runat="server" CssClass="button" Enabled="False" 
                                Text="<%$Resources:ButtonResource,btnNew%>" /></td>   
                          <td><asp:Button ID="btnSave" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnSave%>" 
                                  OnClick="btnSave_Click" /></td>      
                        <td><asp:Button ID="btnEdit" runat="server" CssClass="button" Enabled="False" 
                                Text="<%$Resources:ButtonResource,btnEdit%>" OnClick="btnEdit_Click" /></td>
                         <td><asp:Button ID="btnAction" runat="server" CssClass="button" Enabled="False" 
                                 Text="<%$Resources:ButtonResource,btnAction%>" /></td>
                    </tr>
                </table>
            </div>
            <div class="blank8">
            </div>           
            <asp:UpdatePanel ID="up1" runat="server">
                <ContentTemplate>     
                    <div id="div_List">
                    <div id="div_List_msg">
                        <asp:Label ID="lblMsg" runat="server" CssClass="label_message"></asp:Label>
                    </div>
                         <asp:GridView ID="gvPCMaintenanceList" runat="server" 
                             AutoGenerateColumns="False" AllowSorting="True"   
                             CssClass="gridview"  oninit="gvPCMaintenanceList_Init" 
                             DataKeyNames="WH_ID,GROUP_NO,STATUS_MSG,PHYSICAL_REQUEST_ID,TAG_NO,STATUS,SYS_QTY,TEAM_NO,COUNT_QTY,OWNER_ID,SKU_ID,LOC,LOT,LPN_ID,PACK_ID,UOM_ID,CREATED_BY,CREATED_DATE" 
                             PageSize="20" Width="1300px" OnRowDataBound="gvPCMaintenanceList_RowDataBound" 
                             meta:resourcekey="gvPCMaintenanceList" >
                            <FooterStyle CssClass="GridViewFooterStyle" />
                            <RowStyle CssClass="GridViewRowStyle" />
                            <HeaderStyle CssClass="GridViewHeaderStyle" />
                            <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                <Columns>
                                    <asp:BoundField HeaderText="序号" FooterText="序号" 
                                        meta:resourcekey="BoundField" ><ItemStyle CssClass="GridViewRowWidth_40" /></asp:BoundField>
                                      <asp:TemplateField meta:resourcekey="TemplateField">
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="CheckBox1" runat="server" 
                                                onclick="selectAll(this,'gvPCMaintenanceList');" 
                                                meta:resourcekey="CheckBox1" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chbSelect" runat="server" 
                                                meta:resourcekey="chbSelect" />
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            <asp:CheckBox ID="CheckBox2" runat="server" 
                                                onclick="selectAll(this,'gvPCMaintenanceList');" 
                                                meta:resourcekey="CheckBox2" />
                                        </FooterTemplate>
                                        <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                        <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="申请编号" FooterText="申请编号"   
                                        SortExpression="PHYSICAL_REQUEST_ID" meta:resourcekey="PHYSICAL_REQUEST_ID" >
                                        <ItemTemplate>
                                            <asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("PHYSICAL_REQUEST_ID") %>' 
                                                NavigateUrl='<%# FormatUrl("~/Inventory/PCMaintenance.aspx?from=list&ID={0}&TagNo={1}",Eval("PHYSICAL_REQUEST_ID").ToString(),Eval("TAG_NO").ToString()) %>' 
                                                Target="_self" CssClass="hyperlink" 
                                                meta:resourcekey="HyperLink1" ></asp:HyperLink>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>                                    
                                    <asp:BoundField DataField="TAG_NO" HeaderText="盘点标签" FooterText="盘点标签" 
                                        SortExpression="TAG_NO" meta:resourcekey="TAG_NO" ><ItemStyle CssClass="GridViewRowWidth_100" /></asp:BoundField>
                                     <asp:BoundField DataField="STATUS_D" HeaderText="状态" FooterText="状态" 
                                        SortExpression="STATUS_D" meta:resourcekey="STATUS_D" ><ItemStyle CssClass="GridViewRowWidth_100" /></asp:BoundField>
                                    <asp:TemplateField FooterText="系统数量" HeaderText="系统数量" SortExpression="SYS_QTY" 
                                        meta:resourcekey="SYS_QTY">
                                        <ItemTemplate>
                                            <asp:Label ID="lblSysCount" runat="server" 
                                                Text='<%# GetPreferenceDigit(Eval("SYS_QTY").ToString()) %>' 
                                                meta:resourcekey="lblSysCount"></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                        <asp:TemplateField FooterText="初盘数量" HeaderText="初盘数量" 
                                        SortExpression="COUNT_QTY" meta:resourcekey="COUNT_QTY">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtCountQyt" runat="server" 
                                                Text='<%# GetPreferenceDigit(Eval("COUNT_QTY").ToString()) %>' 
                                                meta:resourcekey="txtCountQyt"></asp:TextBox>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>  
                                    <asp:BoundField DataField="TEAM_NO" HeaderText="组队" FooterText="组队" 
                                        SortExpression="TEAM_NO" meta:resourcekey="TEAM_NO" ><ItemStyle CssClass="GridViewRowWidth_100" /></asp:BoundField>
                                    <asp:BoundField DataField="OWNER_ID" HeaderText="货主代码" FooterText="货主代码" 
                                        SortExpression="OWNER_ID" meta:resourcekey="OWNER_ID" ><ItemStyle CssClass="GridViewRowWidth_100" /></asp:BoundField>
                                    <asp:BoundField DataField="SKU_ID" HeaderText="货品代码" FooterText="货品代码" 
                                        SortExpression="SKU_ID" meta:resourcekey="SKU_ID" ><ItemStyle CssClass="GridViewRowWidth_100" /></asp:BoundField>
                                    <asp:BoundField DataField="LOC" HeaderText="货位" FooterText="货位" 
                                        SortExpression="LOC" meta:resourcekey="LOC" ><ItemStyle CssClass="GridViewRowWidth_150" /></asp:BoundField>
                                    <asp:BoundField DataField="LOT" HeaderText="批次号" FooterText="批次号" 
                                        SortExpression="LOT" meta:resourcekey="LOT" ><ItemStyle CssClass="GridViewRowWidth_150" /></asp:BoundField>
                                    <asp:BoundField DataField="LPN_ID" HeaderText="LPN" FooterText="LPN" 
                                        SortExpression="LPN_ID" meta:resourcekey="LPN_ID" ><ItemStyle CssClass="GridViewRowWidth_150" /></asp:BoundField>
                                    <asp:BoundField DataField="PACK_ID" HeaderText="包装代码" FooterText="包装代码" 
                                        meta:resourcekey="PACK_ID" ><ItemStyle CssClass="GridViewRowWidth_100" /></asp:BoundField>
                                    <asp:BoundField DataField="UOM_ID" HeaderText="计量单位" FooterText="计量单位" 
                                        meta:resourcekey="UOM_ID" ><ItemStyle CssClass="GridViewRowWidth_100" /></asp:BoundField>
                                </Columns>
                        </asp:GridView>       
                    </div>
                    <div id="div_pager">
                        <uc1:Pager ID="PagerFooter" runat="server"  OnFirst="btnFirst_Click" OnPrevious="btnPrevious_Click" OnNext="btnNext_Click" OnLast="btnLast_Click" OnGoTo="GoTo_Click"/>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>    
            
            
            <div id="div_List_bottom">
            <table>
                <tr>
                    <td>
                        <asp:Button ID="btnSearch" runat="server" Text="<%$Resources:ButtonResource,btnNewSearch%>" CssClass="button"  Enabled="False"
                            OnClientClick="javascript:window.location.href='PCMaintenanceQuery.aspx';return false;"  />
                    </td>
                    <td>
                        <asp:Button ID="btnReSearch" runat="server" Text="<%$Resources:ButtonResource,btnReSearch%>" CssClass="button"  Enabled="False"
                            OnClientClick="javascript:returnSearch();return false;" />
                    </td>
                    <td>
                        <asp:Button ID="btnList" runat="server" Text="<%$Resources:ButtonResource,btnList%>" CssClass="button"  Enabled="False"
                           onclick="btnList_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnExport" runat="server" Text="<%$Resources:ButtonResource,btnExport%>" CssClass="button"  Enabled="False"
                             onclick="btnExport_Click" />
                    </td>
                </tr>
            </table>
        </div> 
              <input type="hidden" id="hdnFrom" runat="server" />
            <input type="hidden" id="hdnActionID" runat="server" />
    </div>
    </form>
</body>
</html>